package com.atguigu.jxc.controller;

//商品报溢

import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.entity.OverflowList;
import com.atguigu.jxc.service.OverflowListGoodsService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/overflowListGoods")
public class OverflowListGoodsController {

    @Autowired
    OverflowListGoodsService overflowListGoodsService;

    @RequestMapping("/save")
    @RequiresPermissions(value = "商品报溢")
    public ServiceVO save(OverflowList overflowList,String overflowListGoodsStr){
        return overflowListGoodsService.save(overflowList,overflowListGoodsStr);
    }

    @RequestMapping("/list")
    @RequiresPermissions(value = "报损报溢查询")
    public Map<String,Object> list (String sTime,String eTime){
        return overflowListGoodsService.list(sTime,eTime);
    }

    @RequestMapping("/goodsList")
    @RequiresPermissions(value = "报损报溢查询")
    public Map<String,Object> goodsList (Integer overflowListId) {

        return overflowListGoodsService.goodsList(overflowListId);

    }




}
